<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>医生诊断页面</title>
  <meta name="description" content="app, web app, responsive, admin dashboard, admin, flat, flat ui, ui kit, off screen nav" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  <link rel="stylesheet" href="/static/bootstrap.css" type="text/css" />
  <link rel="stylesheet" href="/static/animate.css" type="text/css" />
  <link rel="stylesheet" href="/static/font-awesome.min.css" type="text/css" />
  <link rel="stylesheet" href="/static/font.css" type="text/css" cache="false" />
  <link rel="stylesheet" href="/static/plugin.css" type="text/css" />
  <link rel="stylesheet" href="/static/app.css" type="text/css" />
  <link rel="stylesheet" href="/static/fuelux.css" type="text/css" />
  <link rel="stylesheet" href="/static/select2.css" type="text/css" />
  <!--[if lt IE 9]>
    <script src="js/ie/respond.min.js" cache="false"></script>
    <script src="js/ie/html5.js" cache="false"></script>
    <script src="js/ie/fix.js" cache="false"></script>
  <![endif]-->
  <meta charset="utf-8">
    <script type="text/javascript">
        var t = null;

        function time() {
            dt = new Date();
            var y = dt.getFullYear();
            var M = dt.getMonth() + 1;
            var d = dt.getDate();
            var h = dt.getHours();
            var m = dt.getMinutes();
            var s = dt.getSeconds();
            M=checkTime(M);
            d=checkTime(d);
       		h=checkTime(h);
            m=checkTime(m);
            s=checkTime(s);
            document.getElementById("timeShow").innerHTML = "当前时间：" + y + "-" + M + "-" + d + " " + h + ":" + m + ":" + s;
            t = setTimeout(time, 1000);
        }

        window.onload = function () {
            time()
        }
        
        function checkTime(i){
        if(i<10){
            i="0"+i;
        }
        return i;
    }
    </script>
    <style type="text/css">
      #date{background:#6ed4f4;border:none}
    </style>
  
</head>
<body>
  <section class="hbox stretch"> 
    <!-- 整体页面 -->
    <!-- .aside -->
    <aside class="bg-info aside-md" id="nav">
      <!-- 左半部分 -->
      <section class="vbox">
        <!-- 还是左半部分，所以说vbox到底是个啥 -->
        <header class="nav-bar dker">
          <!-- 最上面的标题 具体是啥我也不明白 -->
          <a class="btn btn-link visible-xs" data-toggle="class:nav-off-screen" data-target="#nav">
            <i class="fa fa-bars"></i>
          </a>
          <a href="#" class="nav-brand" data-toggle="fullscreen">病人列表</a>
          <a class="btn btn-link visible-xs" data-toggle="class:show" data-target=".nav-user">
            <i class="fa fa-comment-o"></i>
          </a>
        </header>
        <section>
          <!-- 显示医生个人信息 -->
          <!-- 使用模板语言传入数据 -->
          <div align="center"><font color="black"> 一切为了病人的安全<br>工作医生姓名：{{name}}<br>工号：{{id}}<br>您当前所在的诊室：{{room}}
          </font></div>
          <nav class="nav-primary hidden-xs">
            <ul class="nav">
              {% for foo in pNameId %}
              <li>
                <form action="#" method="POST">
                  {% csrf_token %}
                  <button type="submit" style="width: 100%; height: 80px;font-size:20px;" id="date" value="选择病人 {{foo.1}}" name="选择病人">
                  <div align="center"><font size="5">{{foo.0}} </font>
                    <font size="4"><br>身份证号：{{foo.1}}</font></div>
                </button>
                </form>
              </li> 
              {% endfor %} 
            </ul>
          </nav>
          <!-- note -->
          
          <!-- / note -->
        </section>
        <footer><font size="4">
          <div id="timeShow"></div></font></footer>
      </section>
    </aside>
    <!-- /.aside -->
    <!-- .vbox -->
    <section id="content">
      <!-- 右半部分 -->
      <section class="hbox stretch" id="taskapp">
        <aside>
          <section class="vbox">
            <header class="header bg-light lter bg-gradient b-b" style="background-color: white;">
              <!-- 当前病人信息 -->
              <div style="width: 80%;float: left;">
              <font size='4'>
                病人姓名：{{pinfo.1}} &nbsp;&nbsp;性别：{{pinfo.2}}&nbsp;&nbsp;年龄：{{pinfo.3}}<br>
                病人联系方式：{{pinfo.4}}&nbsp;&nbsp;身份证号：{{pinfo.0}}

              </font>
            </div>
            <div style="width: 20%;float: left;line-height: 50px;">
              <form action="#" method="POST">
                {% csrf_token %}
            <button class="btn btn-s-md btn-success" type="submit" name="诊断完成" value="诊断完成">诊断完成</button>
              </form>
            </div>
            </header>     
            <section class="bg-light lter">
              <section class="panel" style="height: 100%;">
                <header class="panel-heading bg-light">
                  <ul class="nav nav-tabs nav-justified">
                    <li class="active"><a href="#assay" data-toggle="tab" style="height:100%;"><font size="5">化验</font></a></li>
                    <li><a href="#treatment" data-toggle="tab" style="height:100%;"><font size="5">治疗</font></a></li>
                    <li><a href="#medicine" data-toggle="tab" style="height:100%;"><font size="5">取药</font></a></li>
                    <li><a href="#hospitalize" data-toggle="tab" style="height:100%;"><font size="5">住院</font></a></li>
                    <li><a href="#change_case" data-toggle="tab" style="height:100%;"><font size="5">增添病例</font></a></li>
                  </ul>
                </header>
                <div class="panel-body">
                  <div class="tab-content">
                    <div class="tab-pane active" id="assay">
                      <!-- 化验部分 -->
                      <section class="panel">
                        <header class="panel-heading font-bold">
                          化验提交表单
                        </header>
                        <div class="panel-body">
                          <form action="#" class="form-horizontal"  method="POST">
                            <!-- 这里是from -->
                            {% csrf_token %}
                            <div class="form-group">
                              <!-- 选择化验类型部分 -->
                              <label class="col-sm-2 control-label">请选择化验类型</label>
                              <div class="col-sm-10">
                                <select name="account" class="form-control m-b">
                                  <option>验血</option>
                                  <option>核磁共振</option>
                                  <option>X光</option>
                                </select>
                              </div>
                            </div>
                            <div class="form-group">
                              <!-- 添加备注部分 -->
                              <label class="col-sm-2 control-label">添加备注</label>
                              <div class="col-sm-10">
                                <input type="remark" name="" class="form-control" style="height:34px;max-height:150px" name='化验备注信息'>
                              </div>
                            </div>
                            <div class="form-group">
                              <!-- 提交部分 -->
                              <div class="col-sm-4 col-sm-offset-2">
                                <button type="reset" class="btn btn-white">取消</button>
                                <button type="submit" class="btn btn-primary" name='选择化验' value="化验">确定</button>
                              </div>
                            </div>
                          </form>
                        </div>
                      </section>
                    </div>
                    <div class="tab-pane" id="treatment">
                      <!-- 治疗部分 -->
                      <section class="panel">
                        <header class="panel-heading font-bold">
                          治疗提交表单
                        </header>
                        <div class="panel-body">
                          <form  class="form-horizontal" method="POST">
                            {% csrf_token %}
                            <!-- 这里是from -->
                            <div class="form-group">
                              <!-- 选择化验类型部分 -->
                              <label class="col-sm-2 control-label">请选择治疗类型</label>
                              <div class="col-sm-10">
                                <select name="account" class="form-control m-b">
                                  <option>针灸</option>
                                  <option>拔罐</option>
                                  <option>鼻涕吸取</option>
                                </select>
                              </div>
                            </div>
                            <div class="form-group">
                              <!-- 添加备注部分 -->
                              <label class="col-sm-2 control-label">添加备注</label>
                              <div class="col-sm-10">
                                <input type="remark" class="form-control" style="height:34px;max-height:150px">
                              </div>
                            </div>
                            <div class="form-group">
                              <!-- 提交部分 -->
                              <div class="col-sm-4 col-sm-offset-2">
                                <button type="reset" class="btn btn-white">取消</button>
                                <button type="submit" class="btn btn-primary">确定</button>
                              </div>
                            </div>
                          </form>
                        </div>
                      </section>
                    </div>
                    <div class="tab-pane" id="medicine">
                      <!-- 药物部分，给病人开药 目前希望能够做到同时能开数量无上限的药物 -->
                      <section class="panel">
                        <header class="panel-heading font-bold">
                          开具药方
                        </header>
                        <div class="panel-body">
                          <form action="#" class="form-horizontal" method="POST">
                            <!-- 这里是from -->
                            <div class="form-group" style="width: 50%;float: left;">
                              <label class="col-sm-2 control-label">药物</label>
                              <div class="col-sm-10">
                                <select name="account" class="form-control m-b">
                                  <option>针灸</option>
                                  <option>拔罐</option>
                                  <option>鼻涕吸取</option>
                                </select>
                              </div>
                            </div>
                            <div class="form-group" style="width: 50%;float: left;">
                              <label class="col-sm-2 control-label">数量</label>
                              <div class="col-sm-10">
                              <div id="MySpinner" class="spinner input-group" data-min="1" data-max="10">
                              <input type="text" class="form-control spinner-input" value="1" name="spinner" maxlength="3">
                              <div class="btn-group btn-group-vertical input-group-btn">
                              <button type="button" class="btn btn-white spinner-up">
                              <i class="fa fa-chevron-up text-muted"></i>
                              </button>
                              <button type="button" class="btn btn-white spinner-down">
                              <i class="fa fa-chevron-down text-muted"></i>
                              </button>
                              </div>
                              </div>
                              </div>
                            </div>
                            <div class="form-group" style="width: 100%;float:left;">
                              <!-- 添加备注部分 -->
                              <label class="col-sm-2 control-label">添加备注</label>
                              <div class="col-sm-10">
                                <input type="remark" class="form-control" style="height:34px;max-height:150px">
                              </div>
                            </div>
                            <div class="form-group">
                              <!-- 提交部分 -->
                              <div class="col-sm-4 col-sm-offset-2">
                                <button type="reset" class="btn btn-white">取消</button>
                                <button type="submit" class="btn btn-primary">确定</button>
                              </div>
                            </div>
                          </form>
                        </div>
                      </section>
                    </div>
                    <div class="tab-pane" id="hospitalize">
                      <!-- 住院部分 -->
                      <section class="panel">
                        <header class="panel-heading font-bold">
                          住院请求提交
                        </header>
                        <div class="panel-body">
                          <form  class="form-horizontal" method="POST">
                            <!-- 这里是from -->
                            {% csrf_token %}
                            <div class="form-group">
                              <label class="col-sm-2 control-label">住院确认</label>
                          <div class="col-sm-10">
                            <div class="checkbox">
                          <label>
                            <input type="checkbox" name="住院" value="是">该病人确实需要住院
                          </label>
                         </div>
                          </div>
                          <div class="form-group">
                            <label class="col-sm-2 control-label">是否因手术住院</label>
                            <div class="col-sm-10">
                              
      
                              <div class="radio">
                                <label>
                                  <input type="radio" name="手术" id="是" value="是" checked>
                                  是
                                </label>
                              </div>
                              <div class="radio">
                                <label>
                                  <input type="radio" name="手术" id="否" value="否">
                                  否
                                </label>
                              </div>
                            </div>  
                          </div>
                        <div class="form-group">
                              <!-- 添加备注部分 -->
                              <label class="col-sm-2 control-label">添加备注</label>
                              <div class="col-sm-10">
                                <input type="remark" name="住院备注信息" class="form-control" style="height:34px;max-height:150px">
                              </div>
                            </div>        
                            <div class="form-group">
                              <!-- 提交部分 -->
                              <div class="col-sm-4 col-sm-offset-2">
                                <button type="reset" class="btn btn-white">取消</button>
                                <button type="submit" class="btn btn-primary" name="选择住院" value="是">确定</button>
                              </div>
                            </div>
                          </div>
                          </form>
                          {% if messages %}
                              <script>
                              {% for msg in messages %}
                              alert('{{ msg.message }}');
                              {% endfor %}
                              </script>
                          {% endif %}
                        
                      </section>
                    </div>
                    <div class="tab-pane" id="change_case">
                      <section class="panel">
                        <header class="panel-heading font-bold">
                          添加病例
                        </header>
                        <div class="panel-body">
                          <form  class="form-horizontal" method="POST">
                            <!-- 这里是from -->
                            {% csrf_token %}
                            <div class="form-group">
                              <!-- 添加备注部分 -->
                              <label class="col-sm-2 control-label">添加病例</label>
                              <div class="col-sm-10">
                                <input type="remark" class="form-control" name="病例信息"  style="height:34px;max-height:150px">
                              </div>
                            </div>
                            <div class="form-group">
                              <!-- 提交部分 -->
                              <div class="col-sm-4 col-sm-offset-2">
                                <button type="submit" class="btn btn-white">取消</button>
                                <button type="submit" class="btn btn-primary" name="增添病例" value="是">确定</button>
                              </div>
                            </div>
                          </form>
                        </div>
                      </section>
                    </div>
                  </div>
                </div>
              </section>
            </section>
            
          </section>
        </aside>
        <!-- .aside -->
        <aside class="col-lg-4 bg-white">
          <!-- 右半部分 -->
          <section class="vbox flex b-l" id="task-detail">
            {% for foo in case %}
            <div style="background-color: antiquewhite;width: 100%;height: 100px;border: black;"><font size="4">
              病例：{{foo.0}}
              <br/>诊断医生：{{foo.1}}
              <br/>医生类型：{{foo.2}}
              <br/>诊断时间：{{foo.3}}
            </font></div>
            {% endfor %}
            <div style="width: 100%;height: 20px;"></div>
          
          </section>
        </aside>
        <!-- /.aside -->
      </section>
    </section>
    <!-- /.vbox -->    
  </section>
	<script src="/static/jquery.min.js"></script>
  <!-- Bootstrap -->
  <script src="/static/bootstrap.js"></script>
  <!-- App -->
  <script src="/static/app.js"></script>
  <script src="/static/app.plugin.js"></script>
  <script src="/static/app.data.js"></script>  
  <script src="/static/underscore-min.js"></script>
  <script src="/static/backbone-min.js"></script>
  <script src="/static/backbone.localStorage-min.js"></script>
  <script src="/static/moment.min.js"></script>
  <!-- Tasks -->
  <script src="/static/tasks.js" cache="false"></script>
  <script src="/static/fuelux.js"></script>
  <script src="/static/select2.min.js"></script>    
</body>
</html>